import request from '@/config/axios'

// 团队业绩 VO
export interface TeamShareVO {
  id: number // ID
}

// 团队业绩 API
export const TeamShareApi = {
  // 查询团队业绩分页
  getTeamSharePage: async (params: any) => {
    return await request.get({ url: `/wo/team-share/page`, params })
  },

  // 查询团队业绩详情
  getTeamShare: async (id: number) => {
    return await request.get({ url: `/wo/team-share/get?id=` + id })
  },

  // 新增团队业绩
  createTeamShare: async (data: TeamShareVO) => {
    return await request.post({ url: `/wo/team-share/create`, data })
  },

  // 修改团队业绩
  updateTeamShare: async (data: TeamShareVO) => {
    return await request.put({ url: `/wo/team-share/update`, data })
  },

  // 删除团队业绩
  deleteTeamShare: async (id: number) => {
    return await request.delete({ url: `/wo/team-share/delete?id=` + id })
  },

  // 导出团队业绩 Excel
  exportTeamShare: async (params) => {
    return await request.download({ url: `/wo/team-share/export-excel`, params })
  }
}